<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="../../vue.js"></script>
</head>

<body>
  <div id="app">
    {{fullname}}--{{getFullname()}}
    <input type="text" v-model.lazy="question" />
  </div>

</body>
<script>

  var user = {
    firstname: 'chang',
    lastname: 'yi',
    question: ''
  }

  var vm = new Vue({
    el: '#app',
    data: user,
    computed: {
      fullname() {
        return this.firstname + this.lastname;
      }
    },
    methods: {
      getFullname() {
        return this.firstname + this.lastname;
      }
    },
    watch: {
      firstname(newval, oldval) {
        console.log(newval, oldval)
      },
      question(newval, oldval) {
        console.log(newval, oldval)
      }
    }
  })



</script>

</html>